<template>
  <div>
    <pstep :stepData="stepData" :doneNum="doneNum"  style="margin-bottom: 20px;width: 90%;"></pstep>
    <!-- 第一步 -->
    <div v-show="doneNum===1">
      <pscFormOne></pscFormOne>
      <div class="step-btn-box">
        <el-button type="primary" @click="doneNum=2">下一步</el-button>
      </div>
    </div>
    <!-- 第二步 -->
    <div v-show="doneNum===2">
      <viewS @edit="(val)=>{doneNum=val}"></viewS>
      <div class="step-btn-box">
        <el-button class="mr10" @click="doneNum=1">上一步</el-button>
        <el-button type="primary" @click="handleAdd">立即申请</el-button>
      </div>
    </div>
  </div>
</template>

<script>
import pstep from '@/components/publicStep'
import pscFormOne from './formOne'
import viewS from './viewShow'
export default {
  components:{pstep,pscFormOne,viewS},
  data() {
      return {
        stepData:[
          {num:1,nameIn:'1',nameOut:'基础配置'},
          {num:2,nameIn:'2',nameOut:'确认信息'}
        ],
        doneNum:1,
      }
    },
    methods: {
      handleAdd() {
        console.log('submit!');
        // 发送请求
        // 返回列表页
        this.$router.push({path:'/saveresource/blockSave'})
      }
    }

}
</script>

<style scoped lang="less">

</style>
